import { createRouter, createWebHistory } from "vue-router";
import home from "../views/home/index.vue";
import about from "../views/about/index.vue";
import vueApp from "../views/vueApp/index.vue";
import reactApp from "../views/reactApp/index.vue";
//路由配置数组
export default createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "Home",
      component: home,
    },
    {
      path: "/about",
      name: "About",
      component: about,
    },
    {
      // 👇 非严格匹配，/my-page/* 都指向 MyPage 页面; vue-router@4.x path的写法为：'/my-page/:page*'
      path: '/vueApp/:page*', 
      name: 'VueApp',
      component: vueApp,
    },
    {
      // 👇 非严格匹配，/my-page/* 都指向 MyPage 页面; vue-router@4.x path的写法为：'/my-page/:page*'
      path: '/reactApp/:page*', 
      name: 'ReactApp',
      component: reactApp,
    }
  ],
});
